Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: format codebase with Prettier #227

Merged
merged 8 commits into from
Apr 3, 2024

Conversation

anton-trunov
Copy link
Member

and introduce a CI check that the codebase is properly formatted

Closes #226

  • I have updated CHANGELOG.md
  • I have added unit tests to demonstrate the contribution is correctly implemented
  • I have run all the tests locally and no test failure was reported
  • I did not introduce unrelated formatting/whitespace changes in the code base
  • I did not do unrelated and/or undiscussed refactorings

Everything is the default, except I kept the 4 spaces indentation level for TS and JS files (see .editorconfig) and excluded the auto-generated and vendored files that are not in .gitignore, which Prettier ignores as well (see .prettierignore).

Introduce a CI check that the codebase is properly formatted
@anton-trunov anton-trunov added infrastructure scope: ci Continuous Integration: GitHub Actions (.github), commit/push hooks (.husky) labels Apr 2, 2024
@anton-trunov anton-trunov added this to the v1.3.0 milestone Apr 2, 2024
.prettierignore Show resolved Hide resolved
byakuren-hijiri
byakuren-hijiri previously approved these changes Apr 2, 2024
Copy link
Contributor

@byakuren-hijiri byakuren-hijiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of unified code formatting, and the default configuration suggested by Prettier looks good to me.

I would suggest only removing the following line from thepull_request_template.md, as it is checked by CI for now:

I did not introduce unrelated formatting/whitespace changes in the code base

@anton-trunov anton-trunov requested a review from novusnota April 3, 2024 07:24
@anton-trunov
Copy link
Member Author

@byakuren-hijiri thanks! [if only there was a way to automatically check all the other bullet points, lol]

Copy link
Member

@novusnota novusnota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!
"Live and learn and break CI" :)

@anton-trunov anton-trunov merged commit 87b5cd6 into main Apr 3, 2024
3 checks passed
@anton-trunov anton-trunov deleted the format-codebase-with-prettier branch April 3, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: ci Continuous Integration: GitHub Actions (.github), commit/push hooks (.husky)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Format codebase with Prettier and check in CI everything is formatted
3 participants